import request from '@/utils/request';
import { AxiosPromise } from 'axios';
import { InfoVO, InfoForm, InfoQuery } from '@/api/bykt/info/types';
export const addVideo = (data:any) => {
  return request({
    url: '/bykt/video',
    method: 'post',
    data: data || {}
  });
};
export const editVieo= (data:any) => {
  return request({
    url: '/bykt/video',
    method: 'put',
    data: data || {}
  });
};
export const deltVieo = (ids: string | number | Array<string | number>) => {
  return request({
    url: '/bykt/video/' + ids,
    method: 'delete'
  });
};

/**
 * 查询章节信息详细
 * @param id
 */
export const getVideoInfo = (id: string | number): AxiosPromise<InfoVO> => {
  return request({
    url: '/bykt/video/' + id,
    method: 'get'
  });
};


/**
 * 查询视频信息列表
 * @param query
 */
export const getVideoList = (query) => {
  return request({
    url: '/bykt/video/list',
    method: 'get',
    params: {...query}
  });
};

